<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
			// 闭包是指有权访问另一个函数作用域中变量的函数
			function fn() {
				let num = 10;
				function fun() {
					console.log(num);
				}
				fun();
			}
			fn();
		</script>
	</body>
</html>
